package ls.ch03.test;

/**
 * @author ls
 * @Date 创建时间:2022/4/11 10:04
 * 描述:
 */

public class Method {
   public Calculate fang(String yun){
       Calculate calculate=null;
       if (yun.equals("+")){
           calculate=new Plus();
       }else if (yun.equals("-")){
           calculate =new Subtract();
       }else if (yun.equals("*")) {
           calculate = new Ride();
       }else if (yun.equals("/")){
           calculate=new Divide();
       }
       return calculate;
   }
}
